function AtkMap(selfList,enemyList){
	var self = this;
	base(this,LSprite,[]);
	self.mapX = 100;
	self.layerInit();
	
	selfQuery = new LQuadTree(new LRectangle(0,0,LGlobal.width - self.mapX,LGlobal.height));
	selfQuery.createChildren(3);
	enemyQuery = new LQuadTree(new LRectangle(0,0,LGlobal.width - self.mapX,LGlobal.height));
	enemyQuery.createChildren(3);
	
	for(var i=0;i<selfList.length;i++)self.addCharacter(selfList[i]);
	for(var i=0;i<enemyList.length;i++)self.addCharacter(enemyList[i]);
	
	self.addEvent();
}
AtkMap.prototype.addCharacter=function(chara){
	characterLayer.addChild(chara);
	if(chara.belong == BELONG.ENEMY){
		enemyQuery.add(chara,chara.x,chara.y);
	}else{
		selfQuery.add(chara,chara.x,chara.y);
	}
}
AtkMap.prototype.layerInit=function(){
	var self = this;
	backLayer = new LSprite();
	backLayer.x = self.mapX;
	backLayer.graphics.drawRect(1,"#000000",[0,0,LGlobal.width - self.mapX,LGlobal.height]);
	self.addChild(backLayer);

	characterLayer = new LSprite();
	characterLayer.x = self.mapX;
	self.addChild(characterLayer);
	
	selectLayer = new LSprite();
	selectLayer.x = self.mapX;
	selectLayer.alpha = 0.5;
	self.addChild(selectLayer);
	
	ctrlLayer = new AtkMapCtrl();
	self.addChild(ctrlLayer);
}
AtkMap.prototype.addEvent=function(){
	var self = this;
	backLayer.addEventListener(LMouseEvent.MOUSE_DOWN,atkMapDown);
	backLayer.addEventListener(LMouseEvent.MOUSE_MOVE,atkMapMove);
	backLayer.addEventListener(LMouseEvent.MOUSE_UP,atkMapUp);
}